Help File for QuickLINK (TM)
Copyright (C) BaySys 1991-1992


--------------------------- OPEN LNK FILE ---------------------------

Creating a new LNK file:

    Before QuickLINK can start compiling and linking, you must first
    tell it what BASIC file(s) to use. The "File/New LNK File" menu
    command gives you a listing of all the .BAS files found in the
    path you set in the "Options/Set Paths" dialog box. Once you
    select a file, QuickLINK searches to see if you have a .MAK file
    with the same name. If one exists, all the files listed in the
    .MAK file will be included. If a .MAK file does not exist, then
    only the single .BAS file you selected will be included.

    A LNK file is then created (using the base name of the .BAS file
    you selected, with a .LNK extension added) with the default
    compile and link options. You can then proceed to edit any or
    all of the options using the Edit menu.

    If you wish to save the LNK file under a different name, use
    the "File/Save As" menu command.

Opening a LNK file:

    QuickLINK stores all your Compile and Link options in files
    called LNK files. The "File/Open LNK File" menu command gives
    you a listing of all the LNK files that you have created so far.

    Each time you Open a LNK file, QuickLINK displays all the
    options you specified for that program the last time it was
    saved. You can edit these options at any time, thus allowing
    you to experiment with different options until you get it the
    way you want it.

    QuickLINK will automatically ask you if you want to save the
    file whenever you create a new LNK file, open another LNK file,
    or exit QuickLINK. To save these options at any other time, use
    the "File/Save" menu command.


----------------------- COMPILER (BC) OPTIONS -----------------------

The Microsoft BASIC Compiler (BC) options include:

/A
    Creates a listing of the disassembled Object code for each
    source line and shows the assembly language code generated by
    the compiler.

/Ah
    Allows dynamic arrays of records, fixed-length strings, and
    numeric data to be larger than 64K each. If /Ah is not
    specified, the maximum size is 64K per dynamic array. Be sure
    to use either /Ah or /D when you are compiling Quick library
    routines that will be loaded into QBX with the /Ea option (which
    moves arrays into expanded memory). This is necessary because
    /Ah and /D cause run-time calls instead of inline code
    generation for array references.

/C:buffersize
    Sets the size of the buffer receiving remote data for each
    communications port when using an asynchronous communications
    adapter.

/D
    Generates debugging code for run-time error checking and enables
    Ctrl+Break. For ISAM programs, causes BASIC to write open
    database buffers to disk after every DELETE, INSERT, UPDATE, or
    CLOSE statement. Be sure to use either /D or /Ah when you are
    compiling Quick library routines that will be loaded into QBX
    with the /Ea option (which moves arrays into expanded memory).
    This is necessary because /D and /Ah cause run-time calls
    instead of in-line code generation for array references.

/E
    Specifies presence of ON ERROR with RESUME linenumber statements
    (See also the discussion of the /X option in this list.)

/Es
    Allows you to share expanded memory between BASIC and mixed-
    language routine(s) that make use of expanded memory. Specify
    /Es when you are going to use a mixed-language routine that
    makes use of expanded memory.

/FBr [filename]
    Generates a file containing restricted program symbol
    information for use with the Programmer's WorkBench Source
    Browser. This information file has the name specified by the
    filename argument. If no name is specified, it has the same name
    as the source file with an .SBR filename extension. The file
    contains information about the definitions and references to all
    global symbols.

/FBx [filename]
    Generates a file containing extended program symbol information
    for use with the Programmer's WorkBench Source Browser. This
    information file has the name specified by the filename argument.
    If no name is specified, it has the same name as the source file
    with an .SBR filename extension. The file contains information
    about the definitions and references to all global and local
    symbols.

/FPa
    Causes your program to use the alternate-math library for
    floating-point operations.

/FPi
    Causes the compiler to generate in-line instructions for use in
    floating-point operations.

/Fs
    Enables far strings in user programs.

/G2
    Enables 80286-specific instructions.

/Ib
    Sets the minimum number of buffers to be used by ISAM. ISAM
    defaults to 6 buffers for reduced functionality (PROISAM) and 9
    for full functionality (PROISAMD). The maximum allowable value
    is 512.

/Ie
    Sets the amount of expanded memory, in kilobytes, to leave for
    non-ISAM use when you are working with ISAM. If omitted, all
    expanded memory (up to about 1.2 megabytes) is used by ISAM. A
    value of -1 indicates ISAM should use no expanded memory.

/Ii
    Specifies the number of non-NULL ISAM indexes used in a program.
    If omitted, the default is 30, which is the minimum value. The
    maximum allowable value is 500.

/Lp
    Creates a protected-mode Object file; the default if running BC
    from an OS/2 protected-mode session.

/Lr
    Creates a real-mode Object file; the default if running BC from
    DOS or an OS/2 real-mode session.

/MBF
    Allows your BASIC program to read and write floating-point
    values stored in Microsoft Binary format. The intrinsic
    functions MKS$, MKD$, CVS, and CVD are converted to MKSMBF$,
    MKDMBF$, CVSMBF, and CVDMBF, respectively.

/O
    Substitutes the default stand-alone library for the default
    run-time library (creates a stand-alone executable file that can
    run without a BASIC run-time module).

/Ot
    Optimizes execution speed for SUB and FUNCTION procedures, and
    DEF FNstatements if certain conditions are met. (For
    conditions, see the Microsoft BASIC Programmer's Guide).

/R
    Stores arrays in row-major order. BASIC normally stores arrays
    in column-major order.

/S
    Writes quoted strings to the Object file instead of the symbol
    table. Use this option when an "Out of Memory" error message
    occurs in a program that has many string constants.

/T
    Suppresses warnings given by the compiler. By default, the
    interpreter passes this option to BC when you select Make EXE
    File from the environment.

/V
    Enables event trapping for communications (COM), lightpen (PEN),
    joystick (STRIG), timer (TIMER), music buffer (PLAY), function
    keys (KEY), OS/2 signal events (SIGNAL), and user-defined events
    (UEVENT). Checks between each BASIC statement for events.

/W
    Enables event trapping for the same statements as /V, but checks
    at each line number or label for occurrence of an event.

/X
    Specifies presence of ON ERROR with RESUME, RESUME NEXT, or
    RESUME 0.

/Z
    Produces a listing of compile-time errors in a form readable by
    the Microsoft (M) editor. If used when compiling within M, /Z
    allows you to locate and scroll through errors in your source
    and include files by invoking the nxtmsg editor function.

/Zd
    Produces an Object file containing line-number records for
    debugging purposes corresponding to the line numbers of the
    source file.

/Zi
    Adds debugging information to the Object file that can be used
    by the Microsoft CodeView debugger.


---------------------------- LINK OPTIONS ---------------------------

The LINK options supported by Microsoft BASIC include:

/A (Alignment): [size]
     The /A option directs LINK to align segments in the .EXE output
     file along the boundaries specified by [size]. The [size]
     argument must be a power of two. The default alignment is 512
     bytes.

     NOTE: This option is applicable to OS/2 programs only.

/BA (Batch)
     This option disables LINK prompting you for a new path name
     whenever it cannot find an Object file or library it was
     directed to use. Instead, LINK generates an error or warning
     message, as appropriate, and leaves the external reference
     unresolved. The /BA option also disables the display of the
     sign-on banner and the display of input from response files.

/CO (CodeView)
     This option is used to prepare for debugging with the Microsoft
     CodeView(R) debugger. With this option, LINK embeds symbolic
     data and line-number information in the executable output file.

     You can run this executable file outside CodeView; the
     debugging information in the file is ignored. However, to
     reduce executable file size, use this option only for
     debugging. Then you can link a separate version without the /CO
     option after the program is debugged.

/DO (DosSeg)
     This option is automatically enabled by a special Object-module
     record in Microsoft language libraries. If you are linking to
     one of these libraries, you do not need to specify this option.
     The /DO option is also enabled by assembly modules that use the
     Microsoft Macro Assembler directive .DOSSEG.

/EX (ExePack)
     This option directs LINK to remove sequences of repeated bytes
     (typically null characters). For DOS programs, this option also
     optimizes the load-time relocation table before creating the
     executable file. (The "load-time relocation table" is a table
     of references relative to the start of the program. Each
     reference changes when the executable image is loaded into
     memory and an actual address for the entry point is assigned.)

     The /E option may reduce file sizes and program load times.
     However, it also strips debugger information. Thus, you cannot
     use CodeView to debug a program linked with this option. In
     unusual cases, this option may actually increase file size.
     LINK returns an error message when this is the case.

/F (FarCallTranslation)
     This option causes LINK to optimize far-call instructions made
     from one segment to a target address in the same segment. The
     new calling sequence is significantly faster when running in
     the protected mode. Also, a load-time relocation is eliminated,
     which decreases program file size and speeds program loading.

     In general, the greatest benefit occurs if you use the /PACKC
     option in addition to the /F option.

     NOTE: There is a small risk involved with using the /F option.
        LINK may mistakenly interpret a byte of immediate data in a
        code segment as a far call if it has to have the far-call
        opcode (0x9A). With Microsoft high-level languages, this
        risk is very small because little immediate data is stored
        in code segments

/INF (Information)
     This option causes LINK to display information about the
     linking process, including the phase of linking and the names
     of the Object files being linked. Use this option to determine
     the locations of the Object files being linked and the order in
     which they are linked. The output from this option is sent to
     standard output.

/LI (LineNumbers)
     This option includes source-file line numbers and associated
     addresses in the map file. In addition, you must give LINK an
     Object file (or files) with line-number information. You can
     use the /Zd option with most Microsoft compilers to include
     line numbers in the Object file. If you give LINK an Object
     file without line-number information, the /LI option has no
     effect.

     The /LI option forces LINK to create a map file even if you did
     not explicitly tell LINK to create a map file. By default, the
     file is given the same base name as the executable file, plus
     the extension .MAP. You can override the default name by
     explicitly specifying a map-file name.

/M (Map)
     This option lists in the map file all public (global) symbols
     defined in the Object file(s). With this option, the map file
     contains a list of all the symbols sorted by name, and a list
     of all the symbols sorted by address. If you don't use this
     option, the map file contains only a list of segments.

     With this option, LINK creates a map file by default. If you
     explicitly enter a map-file name of NUL, then no map file is
     created, and this option has no effect.

/NOD (NoDefaultLibrarySearch): [filename]
     This option tells LINK to ignore default libraries when
     resolving external references. If you specify an Object file in
     [filename], LINK ignores only the default libraries in
     [filename].

     In general, high-level-language programs do not work correctly
     without standard libraries. Thus, if you use the /NOD option,
     you should explicitly specify the name of a standard library in
     the [libraries] field of the command line.

/NOE (NoExternalDictionary)
     This option prevents LINK from searching the "extended
     dictionary," an internal list of symbol locations included by
     default in libraries generated with LIB.

     Normally, LINK uses the extended dictionary to speed up library
     searches; thus, using /NOE slows LINK. This option should be
     used when a library symbol is redefined. You need to use this
     option when LINK issues error L2044.

/NOF (NoFarCallTranslation)
     Far-call optimization is off by default. If the LINK
     environment variable or another command (such as CL) has turned
     it on, you can use /NOF to turn it off again.

/NOI (NoIgnoreCase)
     This option turns case sensitivity on; that is, LINK treats
     ABC, abc, and Abc as unique names. By default, case sensitivity
     is off. This option can be used when you link programs written
     in case-sensitive languages such as C.

/NOL (NoLogo)
     This option disables the sign-on banner displayed when LINK
     starts.

/NON (NoNullDOSSeg)
     This option arranges segments in a special order. The /NON
     option is equivalent to the /DO option except that /NON does
     NOT insert 16 null bytes at the beginning of the _TEXT segment
     (if this segment is defined).

     The /NON option overrides the /DO option when both are used.
     Therefore, you can use /NON to override the /DO comment record
     commonly found in standard Microsoft libraries.

/NOP (NoPackCode)
     This option turns code segment packing off. By default, code
     segment packing is turned off.

 /O (OverlayInterupt): [number]
     By default, the interrupt number used for passing control to
     overlays is 63 (3F hexadecimal). The /O option allows you to
     select a different interrupt number. This option is valid only
     when you link DOS real-mode programs. The field [number]
     contains a decimal number from 0 to 255.

/PACKC (PackCode)
     This option groups neighboring code segments. Neighboring code
     segments are assigned the same segment address, and offsets to
     each routine are adjusted upward as required. This option is on
     by default and is used only when you wish to override an
     environment variable that has turned code packing off.

     The [number] field specifies the maximum size of a code segment
     grouped by /PACKC. If you do not use the /PACKC option or if
     you omit [number], maximum size defaults to 65,530. LINK stops
     adding segments to a group as soon as it cannot add another
     segment without exceeding [number]. At this point, LINK forms a
     new segment.

     Code packing generally produces slightly faster and more
     compact code, especially for OS/2 programs. Use the /F option
     to provide the maximum opportunity for packing.

/PACKD (PackData)
     This option groups neighboring data segments. It functions like
     the code packing option (/PACKC) except that it packs data
     segments.

     The [number] field specifies the maximum size of a data segment
     grouped by /PACKD; if you omit [number], the maximum size
     defaults to 65,536. LINK stops adding segments to a group as
     soon as it cannot add another segment without exceeding
     [number]. At this point, LINK forms a new group.

     NOTE: This option is applicable to OS/2 programs only.

/PAU (Pause)
     This option makes LINK pause before writing the output file to
     disk. The pause allows you to swap disks. With this option,
     LINK displays the following message before it creates the
     output file:
                   About to generate .EXE file
                   Change diskette in <drive> and press <ENTER>

     LINK writes the output file when you press ENTER. Be sure not
     to remove a disk containing the map file or the temporary file.
     If the disk you need to swap contains either of these files,
     press CTRL+C to terminate the LINK session, rearrange your
     files, and link again.

/PMTYPE (PMType): [type]
     This option specifies the type of application being generated.
     Using the /PM option is equivalent to including a NAME
     statement in the module-definition file.

     NOTE: This option pertains to OS/2 applications only.

/Q (QuickLibrary)
     This option produces a "Quick Library" suitable for use with
     Microsoft BASIC and QuickBASIC.

     NOTE: QuickLINK cannot be used to create Quick Libraries. You
           should either create Quick Libraries in the QB/QBX
           environment, from the DOS command line, or use a third
           party tool (such as Crescent Software's MAKEQLB utility,
           available free on CompuServe in the MSBASIC forum).

/SE (Segments): [number]
     This option sets the number of logical segments a program can
     have. You can set [number] to any value in the range 1 to 3072.

     For each logical segment, LINK must allocate space to keep
     track of segment information. By using a relatively low segment
     limit as a default (128), LINK is able to link faster and
     allocate less storage space.

     When you set the segment limit higher than 128, LINK allocates
     more space for segment information. This option allows you to
     raise the segment limit for programs with a large number of
     segments.

     For programs with fewer than 128 segments, you can keep the
     storage requirements of LINK at the lowest level possible by
     setting the segment [number] field to reflect the actual number
     of segments in the program. If the number of segments allocated
     is too high for the amount of memory LINK has available to it,
     you see the error message "segment limit too high".

     To specify a number of segments that fits in the amount of
     memory available, set the segment lower and relink.

/W (WarnFixup)
     This option issues a warning for each segment relative fix-up
     of location-type "offset," such that the segment is contained
     within a group but is not at the beginning of the group. LINK
     includes the displacement of the segment from the group in
     determining the final value of the fix-up, contrary to what
     happens with DOS executable files.

     NOTE: This option is for linking OS/2 applications only.


-----------------------  BASIC 7.X STUB FILES -----------------------

Stub files are special Object or Library files that prevent certain
parts of the BASIC run-time from being added to your executable file
during Linking, or to add support for other features.

The stub files supported in Microsoft BASIC include:

OVLDOS21.OBJ
    Required in order for a program linked for overlays to work
    under DOS 2.1. Does not reduce the size of the EXE file.

NOCGA.OBJ
    Removes all support for CGA graphics SCREEN modes 1 and 2.

NOCOM.OBJ
    Removes support for COM device I/O. COM support is included by
    LINK if an OPEN statement is used with a string variable in
    place of a file or device name, as in OPEN A$ FOR OUTPUT AS #1,
    or if a string constant starting with COMn is used with an OPEN
    statement.

NOEDIT.OBJ
    Reduces functionality of the editor provided with the INPUT
    statement to support only ENTER and BACK SPACE keys (no HOME,
    END, etc.).

NOEGA.OBJ
    Removes support for EGA graphics SCREEN modes 7-10.

NOEMS.OBJ
    Prevents a program linked for overlays from using Expanded
    Memory Specification (EMS); instead, the program will be forced
    to swap to disk.

NOEVENT.OBJ
    Removes support for event trapping. This stub file is only
    effective if linked with the run-time module; it has no effect
    when linked into stand-alone executables.

NOFLTIN.OBJ
    Allows a program to contain INPUT, VAL and READ statements
    without support for parsing floating point numbers that would
    require the floating point math package to be included. If a
    program is linked with this stub file, all numbers recognized
    by INPUT, VAL and READ must be legal long integers.

NOGRAPH.OBJ
    Removes all support for graphics statements and non-zero SCREEN
    modes. This stub file is a superset of all the following graphic
    SCREEN mode stub files:
                            NOCGA.OBJ
                            NOHERC.OBJ
                            NOOGA.OBJ
                            NOEGA.OBJ
                            NOVGA.OBJ

NOHERC.OBJ
    Removes all support for Hercules graphics SCREEN mode 3.

NOISAM.OBJ
    Removes ISAM functionality from BASIC run-time modules. This
    stub file is not useful when creating stand-alone executables.

NOLPT.OBJ
    Removes support for LPT device I/O. LPT support is included by
    LINK if an OPEN statement is used with a string variable in
    place of a file or device name, as in OPEN A$ FOR OUTPUT AS #1,
    or if a string constant starting with LPTn: is used with an OPEN
    statement. Using this stub file also removes support for screen
    printing using Ctrl+PrtSc.

NOOGA.OBJ
    Removes all support for Olivetti graphics SCREEN mode 4.

NOTRNEMx.LIB
    Removes support for any command using transcendental operation
    including the following: LOG, SQR, SIN, COS, TAN, ATN, EXD, ^,
    CIRCLE statements with a start and/or stop angle, and DRAW
    statements with A or T commands.

NOVGA.OBJ
    Removes all support for VGA graphics SCREEN modes 11-13.

SMALLERR.OBJ
    Reduces the length of run-time error messages.

TSCNIOxx.OBJ
    These stub files limit the program to text-only screen I/O with
    no support for special treatment of control characters. Each
    TSCNIOxx.OBJ stub file is a superset of the following graphics
    related stub files:
                            NOGRAPH.OBJ
                            NOCGA.OBJ
                            NOHERC.OBJ
                            NOOGA.OBJ
                            NOEGA.OBJ
                            NOVGA.OBJ

    NOTE: The TSCNIOxx.OBJ stub files cannot be used in conjunction
          with any of the above graphics stub files.

87.LIB
    Removes software coprocessor emulation, so that an 8087-family
    math coprocessor must be present in order for the program to
    perform any floating-point calculations, if floating-point
    statements are used in the program.

SMALLERR.OBJ
    Reduces the length of run-time error messages.


-----------------------  QuickBASIC STUB FILES ----------------------

Stub files are special Object or Library files that prevent certain
parts of the BASIC run-time from being added to your executable file
during Linking, or to add support for other features.

The stub files supported in QuickBASIC 4.5 include:

NOCOM.OBJ
    Removes support for COM device I/O. COM support is included by
    LINK if an OPEN statement is used with a string variable in
    place of a file or device name, as in OPEN A$ FOR OUTPUT AS #1,
    or if a string constant starting with COMn is used with an OPEN
    statement.

NOEM.OBJ
    Removes software coprocessor emulation, so that an 8087-family
    math coprocessor must be present in order for the program to
    perform any floating-point calculations, if floating-point
    statements are used in the program.

SMALLERR.OBJ
    Reduces the length of run-time error messages.


----------------------- BASIC 7.x LIBRARY FILES ---------------------

The LIB files supplied with BASIC 7.x include:

BCL7xxxx.LIB
    BASIC 7.x Library file used to link to a Stand-Alone EXE file.

BRT7xxxx.LIB
    BASIC 7.x Library file used to link to an EXE file requiring
    the BRT7xxxx.EXE run-time module.

CHRTBxxx.LIB
    BASIC 7.x Presentation Graphics Toolbox library file.

DTFMTxx.LIB
    BASIC 7.x Date/Time and Format add-on library.

FINANCxx.LIB
    BASIC 7.x Financial Functions add-on library.

FONTBxxx.LIB
    BASIC 7.x Font Toolbox library.

MATBxxx.LIB
    BASIC 7.x Matrix Math Toolbox library.

QBX.LIB
    BASIC 7.x Library file used when linking with a BASIC .OBJ file
    that uses the $INCLUDE file 'QBX.BI' to call Interrupts.

QBXQLB.LIB
    BASIC 7.x Library used when creating a Quick Library.

    NOTE: QuickLINK cannot be used to create Quick Libraries. You
          should either create Quick Libraries in the QB/QBX
          environment, from the DOS command line, or use a third
          party tool (such as Crescent Software's MAKEQLB utility,
          available free on CompuServe in the MSBASIC forum).

UITBxxx.LIB
    BASIC 7.x User Interface Toolbox library.

  NOTE: Several of the LIB files supplied with BASIC are built for
  different configurations. These filenames (such as BCL71EFR.LIB)
  contain abbreviations which are represented in the above list as
  "x", where:
               0 = BASIC 7.0            1 = BASIC 7.1
               A = Alternate Math       E = Emulator Math
               F = Far Strings          N = Near Strings
               P = Protected Mode       R = Real Mode


---------------------- QuickBASIC LIBRARY FILES ---------------------

The LIB files supplied with QuickBASIC 4.5 include:

BCOM45.LIB
    QuickBASIC 4.5 Library file to be used when linking to a
    Stand-Alone EXE file.

BQLB45.LIB
    QuickBASIC 4.5 Library used when creating a Quick Library.
    
    NOTE: QuickLINK cannot be used to create Quick Libraries. You
          should either create Quick Libraries in the QB/QBX
          environment, from the DOS command line, or use a third
          party tool (such as Crescent Software's MAKEQLB utility,
          available free on CompuServe in the MSBASIC forum).

BRUN45.LIB
    QuickBASIC 4.5 Library file to be used when linking to an EXE
    file that requires the BRUN45.EXE run-time module.

QB.LIB
    QuickBASIC 4.5 Library file used when linking with a BASIC .OBJ
    file that uses the $INCLUDE file 'QB.BI' to call Interrupts.


------------------------------ OVERLAYS -----------------------------

Overlays:
    If you link an Object file as an overlay, it will only be loaded
    when and if it is needed, thus allowing your program to require
    less memory when run. Because overlays share the same space in
    memory, only one overlay can be loaded at a time, so you must
    organize these modules very carefully.

    See the Microsoft BASIC manual for more complete information on
    linking with overlays.

    NOTE: Although QuickLINK supports multiple overlays in a single
          EXE file, each individual overlay can only consist of one
          Object file. If you wish to create an overlay consisting
          of more than one Object file, you must either combine them
          into a single file, or link from outside of QuickLINK.


----------------------------- MAKE EXE ------------------------------

EXE File Name:
    You can specify the name of the executable file to be created,
    or LINK will use the base name of the first Object file, with an
    .EXE extension added. If you specify a name without an extension
    LINK will append .EXE automatically.

MAP File Name:
    Map files list the segments of a program and the program's
    public symbols, along with other information such as the stack
    size, etc. If you want to create a Map file, you can specify its
    name, or leave it blank if one is not desired. If you specify a
    name without an extension, LINK will append .MAP automatically.

Compile Modified Source File Only:
    This gives you the option of only compiling those source (.BAS)
    files that have been modified since the last time that file was
    compiled. For example, if this option is chosen, then before 
    compiling xxxx.BAS, QuickLINK will search for an object file 
    named xxxx.OBJ. If it is found, QuickLINK will then compare the 
    Date & Time stamp on xxxx.BAS to see if the source code has been
    modified since xxxx.OBJ was created. If it has been modified, 
    then an updated version of xxxx.OBJ will be created.

Exit After making EXE:
    This gives you the option of quitting QuickLINK as soon as the
    Compiling and Linking process is finished. You will be asked if
    you want to save any open files first.